package com.mohunhun.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@Schema(description = "文章实体")
public class Article {

    @Schema(description = "文章ID")
    private Long id;

    @Schema(description = "所属板块ID")
    private Long boardId;

    @Schema(description = "作者用户ID")
    private Long userId;

    @Schema(description = "文章标题")
    private String title;

    @Schema(description = "文章内容")
    private String content;

    @Schema(description = "访问量")
    private Integer visitCount = 0;

    @Schema(description = "回复数")
    private Integer replyCount = 0;

    @Schema(description = "点赞数")
    private Integer likeCount = 0;

    @Schema(description = "状态：0-草稿/禁用，1-发布/启用")
    private Byte state;

    @Schema(description = "删除状态：0-未删除，1-已删除")
    private Byte deleteState;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "是否作者")
    private Boolean isOwn = false;

    // 关联对象
    @Schema(description = "文章作者信息")
    private User user;

    @Schema(description = "板块信息")
    private Board board;


}